// pages/home/home.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 2000,
    duration: 500,
    grids: [
      {
        imgUrl: '../../../images/home_apple.png',
        url: '/pages/map/map',
        image: '../../images/home_apple.png',
        text: '苹果'
      },
      {
        imgUrl: '../../../images/home_orange.png',
        url: '/pages/logs/logs',
        image: '../../images/home_orange.png',
        text: '橙子'
      },
      {
        imgUrl: '../../../images/home_watermelon.png',
        url: '/pages/index/index',
        image: '../../images/home_watermelon.png',
        text: '西瓜'
      },
      {
        imgUrl: '../../../images/home_grape.png',
        url: '/pages/index/index',
        image: '../../images/home_grape.png',
        text: '葡萄'
      },
      {
        imgUrl: '../../../images/home_strawberry.png',
        url: '/pages/index/index',
        image: '../../images/home_strawberry.png',
        text: '草莓'
      },
      {
        imgUrl: '../../../images/home_pear.png',
        url: '/pages/logs/logs',
        image: '../../images/home_pear.png',
        text: '梨子'
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  navigate(e) {
    wx.navigateTo({url: e.currentTarget.dataset.item.url});
  }
})